import React, { Component, useState, useEffect } from 'react'
import { Button } from 'antd'
import withRouter from '../../utils/withRouter'
const Ums = () => {
  const [opt, setOpt] = useState({ page: 1, size: 5 })
  useEffect(() => {
    console.log(opt, 'opt')
  }, [opt])
  return (
    <div>
      Ums
      <h1>{opt.page}</h1>
      <Button
        onClick={() => {
          setOpt(() => {
            opt.page = opt.page + 1
            return { ...opt }
          })
        }}
      >
        按钮
      </Button>
    </div>
  )
}
export default withRouter(Ums)

// export default class index extends Component {
//   render() {
//     return <div>ums</div>
//   }
// }
